import {ORDERLIST, ORDERDETAIL, ORDERUPDATESTATUS, ORDERUPDATECONFIRMNO, ORDERPUSHCONFIRMNO, ORDERPUSHCONFIRMROOM} from '@/services/api'
import {request, METHOD} from '@/utils/request'

/**
 * 获取列表
 */
export async function getOrderList(pageIndex, pageSize, params) {
    params.pageIndex = pageIndex
    params.pageSize = pageSize
    return request(ORDERLIST, METHOD.POST, params)
}

/**
 * 获取列表
 */
export async function getDetail(orderId) {
    return request(ORDERDETAIL, METHOD.GET, {orderId: orderId})
}

/**
 * 更新订单状态
 * @param params
 * @returns {Promise<*>}
 */
export async function updateOrderStatus(params){
    return request(ORDERUPDATESTATUS, METHOD.POST, params)
}

/**
 * 更新酒店确认号
 * @param params
 * @returns {Promise<*>}
 */
export async function updateHotelConfirmNo(params){
    return request(ORDERUPDATECONFIRMNO, METHOD.POST, params)
}

/**
 * 推送酒店确认号
 * @param params
 * @returns {Promise<*>}
 */
export async function pushHotelConfirmNo(params){
    return request(ORDERPUSHCONFIRMNO, METHOD.GET, params)
}

/**
 * 推送确认有房
 * @param params
 * @returns {Promise<*>}
 */
export async function pushConfirmRoom(params){
    return request(ORDERPUSHCONFIRMROOM, METHOD.GET, params)
}